Electronic devices are often locked in order to avoid unintentional and/or unauthorized access. When such electronic devices are locked, they may be unlocked by a user entering a password or another type of predetermined input. However, in some circumstances, it may be inconvenient to enter a password and/or another input every time a given electronic device becomes locked. Accordingly the need exists for new techniques for locking and unlocking electronic devices.